<!doctype html><html lang dir=ltr><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>8.5 ~ 8.9 | 汇编语言 | Hui.Ke - Blog</title><meta name=generator content="Hugo Eureka 0.9.3"><link rel=stylesheet href=https://b.hui.ke/css/eureka.min.9cec6350e37e534b0338fa9a085bf06855de3b0f2dcf857e792e5e97b07ea905d4d5513db554cbc26a9c3da622bae92d.css><script defer src=https://b.hui.ke/js/eureka.min.fa9a6bf6d7a50bb635b4cca7d2ba5cf3dfb095ae3798773f1328f7950028b48c17d06276594e1b5f244a25a6c969a705.js></script>
<link rel=preconnect href=https://fonts.googleapis.com><link rel=preconnect href=https://fonts.gstatic.com crossorigin><link rel=preload href="https://fonts.googleapis.com/css2?family=Lora:wght@400;600;700&family=Noto+Serif+SC:wght@400;600;700&display=swap" as=style onload='this.onload=null,this.rel="stylesheet"'><link rel=stylesheet href=https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/styles/vs.min.css media=print onload='this.media="all",this.onload=null' crossorigin><script defer src=https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js crossorigin></script>
<script defer src=https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/bash.min.js crossorigin></script>
<script defer src=https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/ini.min.js crossorigin></script>
<script defer src=https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/json.min.js crossorigin></script>
<script defer src=https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/php.min.js crossorigin></script>
<script defer src=https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/python.min.js crossorigin></script>
<script defer src=https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/shell.min.js crossorigin></script>
<script defer src=https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/sql.min.js crossorigin></script>
<script defer src=https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/x86asm.min.js crossorigin></script>
<script defer src=https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/xml.min.js crossorigin></script>
<link rel=stylesheet href=https://b.hui.ke/css/highlightjs.min.2958991528e43eb6fc9b8c4f2b8e052f79c4010718e1d1e888a777620e9ee63021c2c57ec7417a3108019bb8c41943e6.css media=print onload='this.media="all",this.onload=null'><script defer type=text/javascript src=https://lib.baomitu.com/font-awesome/6.1.1/js/all.min.js></script>
<link rel=stylesheet href=https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.css integrity=sha384-MlJdn/WNKDGXveldHDdyRP1R4CTHr3FeuDNfhsLPYrq2t0UBkUdK2jyTnXPEK1NQ media=print onload='this.media="all",this.onload=null' crossorigin><script defer src=https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.js integrity=sha384-VQ8d8WVFw0yHhCk5E8I86oOhv48xLpnDZx5T9GogA/Y84DcCKWXDmSDfn13bzFZY crossorigin></script>
<script defer src=https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/contrib/auto-render.min.js integrity=sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR crossorigin></script>
<script>document.addEventListener("DOMContentLoaded",function(){renderMathInElement(document.body,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}]})})</script><script defer src=https://cdn.jsdelivr.net/npm/mermaid@8.14.0/dist/mermaid.min.js integrity=sha384-atOyb0FxAgN9LyAc6PEf9BjgwLISyansgdH8/VXQH8p2o5vfrRgmGIJ2Sg22L0A0 crossorigin></script>
<link rel=icon type=image/png sizes=32x32 href=https://b.hui.ke/icon_hub7ca0b5404c6d576559b2bd22c64b0e5_2009_32x32_fill_box_center_3.png><link rel=apple-touch-icon sizes=180x180 href=https://b.hui.ke/icon_hub7ca0b5404c6d576559b2bd22c64b0e5_2009_180x180_fill_box_center_3.png><meta name=description content="  《汇编语言（第3版）》8.5 ~ 8.9、《零基础入门学习汇编语言》P39 ~ 41"><script type=application/ld+json>{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Docs","item":"https://b.hui.ke/docs/"},{"@type":"ListItem","position":2,"name":"汇编语言","item":"https://b.hui.ke/docs/assembly-language/"},{"@type":"ListItem","position":3,"name":"8.5 ~ 8.9","item":"https://b.hui.ke/docs/assembly-language/11/"}]}</script><script type=application/ld+json>{"@context":"https://schema.org","@type":"Article","mainEntityOfPage":{"@type":"WebPage","@id":"https://b.hui.ke/docs/assembly-language/11/"},"headline":"8.5 ~ 8.9 | 汇编语言 | Hui.Ke - Blog","datePublished":"2020-04-02T10:08:41+08:00","dateModified":"2020-04-02T10:08:41+08:00","wordCount":1493,"author":{"@type":"Person","name":"Hui.Ke"},"publisher":{"@type":"Person","name":"Hui.Ke","logo":{"@type":"ImageObject","url":"https://b.hui.ke/icon.png"}},"description":"\u003cp\u003e  《汇编语言（第3版）》8.5 ~ 8.9、《零基础入门学习汇编语言》P39 ~ 41\u003c\/p\u003e"}</script><meta property="og:title" content="8.5 ~ 8.9 | 汇编语言 | Hui.Ke - Blog"><meta property="og:type" content="article"><meta property="og:image" content="https://b.hui.ke/icon.png"><meta property="og:url" content="https://b.hui.ke/docs/assembly-language/11/"><meta property="og:description" content="  《汇编语言（第3版）》8.5 ~ 8.9、《零基础入门学习汇编语言》P39 ~ 41"><meta property="og:site_name" content="Hui.Ke - Blog"><meta property="article:published_time" content="2020-04-02T10:08:41+08:00"><meta property="article:modified_time" content="2020-04-02T10:08:41+08:00"><meta property="article:section" content="docs"><meta property="article:tag" content="div"><meta property="article:tag" content="dd"><meta property="article:tag" content="dup"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/18/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/17/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/16/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/15/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/14/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/13/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/12/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/10/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/9/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/8/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/7/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/6/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/5/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/4/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/3/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/2/"><meta property="og:see_also" content="https://b.hui.ke/docs/assembly-language/1/"><script>!function(e){"use strict";!function(){var i,s=window,o=document,a=e,c="".concat("https:"===o.location.protocol?"https://":"http://","sdk.51.la/js-sdk-pro.min.js"),n=o.createElement("script"),r=o.getElementsByTagName("script")[0];n.type="text/javascript",n.setAttribute("charset","UTF-8"),n.async=!0,n.src=c,n.id="LA_COLLECT",a.d=n,i=function(){s.LA.ids.push(a)},s.LA?s.LA.ids&&i():(s.LA=e,s.LA.ids=[],i()),r.parentNode.insertBefore(n,r)}()}({id:"Jgb8aUbG5e3rqhrs",ck:"Jgb8aUbG5e3rqhrs",autoTrack:!0,hashMode:!0})</script><body class="flex min-h-screen flex-col"><header class="min-h-16 pl-scrollbar bg-secondary-bg fixed z-50 flex w-full items-center shadow-sm"><div class="mx-auto w-full max-w-screen-xl"><script>let storageColorScheme=localStorage.getItem("lightDarkMode");((storageColorScheme=="Auto"||storageColorScheme==null)&&window.matchMedia("(prefers-color-scheme: dark)").matches||storageColorScheme=="Dark")&&document.getElementsByTagName("html")[0].classList.add("dark")</script><nav class="flex items-center justify-between flex-wrap px-4 py-4 md:py-0"><a href=/ class="me-6 text-primary-text text-xl font-bold">Hui.Ke - Blog</a>
<button id=navbar-btn class="md:hidden flex items-center px-3 py-2" aria-label="Open Navbar">
<i class="fas fa-bars"></i></button><div id=target class="hidden block md:flex md:grow md:justify-between md:items-center w-full md:w-auto text-primary-text z-20"><div class="md:flex md:h-16 text-sm md:grow pb-4 md:pb-0 border-b md:border-b-0"><a href=/posts/ class="block mt-4 md:inline-block md:mt-0 md:h-(16-4px) md:leading-(16-4px) box-border md:border-t-2 md:border-b-2 border-transparent me-4">Posts</a>
<a href=/docs/ class="block mt-4 md:inline-block md:mt-0 md:h-(16-4px) md:leading-(16-4px) box-border md:border-t-2 md:border-b-2 selected-menu-item me-4">Docs</a>
<a href=/categories/ class="block mt-4 md:inline-block md:mt-0 md:h-(16-4px) md:leading-(16-4px) box-border md:border-t-2 md:border-b-2 border-transparent me-4">Categories</a>
<a href=/series/ class="block mt-4 md:inline-block md:mt-0 md:h-(16-4px) md:leading-(16-4px) box-border md:border-t-2 md:border-b-2 border-transparent me-4">Series</a>
<a href=/tags/ class="block mt-4 md:inline-block md:mt-0 md:h-(16-4px) md:leading-(16-4px) box-border md:border-t-2 md:border-b-2 border-transparent me-4">Tags</a>
<a href=/love/ class="block mt-4 md:inline-block md:mt-0 md:h-(16-4px) md:leading-(16-4px) box-border md:border-t-2 md:border-b-2 border-transparent me-4">Love</a>
<a href=/about/ class="block mt-4 md:inline-block md:mt-0 md:h-(16-4px) md:leading-(16-4px) box-border md:border-t-2 md:border-b-2 border-transparent me-4">About</a></div><div class=flex><div class="relative pt-4 md:pt-0"><div class="cursor-pointer hover:text-eureka" id=lightDarkMode><i class="fas fa-adjust"></i></div><div class="fixed hidden inset-0 opacity-0 h-full w-full cursor-default z-30" id=is-open></div><div class="absolute flex flex-col start-0 md:start-auto end-auto md:end-0 hidden bg-secondary-bg w-48 rounded py-2 border border-tertiary-bg cursor-pointer z-40" id=lightDarkOptions><span class="px-4 py-1 hover:text-eureka" name=Light>Light</span>
<span class="px-4 py-1 hover:text-eureka" name=Dark>Dark</span>
<span class="px-4 py-1 hover:text-eureka" name=Auto>Auto</span></div></div></div></div><div class="fixed hidden inset-0 opacity-0 h-full w-full cursor-default z-0" id=is-open-mobile></div></nav><script>let element=document.getElementById("lightDarkMode");storageColorScheme==null||storageColorScheme=="Auto"?document.addEventListener("DOMContentLoaded",()=>{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",switchDarkMode)}):storageColorScheme=="Light"?(element.firstElementChild.classList.remove("fa-adjust"),element.firstElementChild.setAttribute("data-icon","sun"),element.firstElementChild.classList.add("fa-sun")):storageColorScheme=="Dark"&&(element.firstElementChild.classList.remove("fa-adjust"),element.firstElementChild.setAttribute("data-icon","moon"),element.firstElementChild.classList.add("fa-moon")),document.addEventListener("DOMContentLoaded",()=>{getcolorscheme(),switchBurger()})</script></div></header><main class="grow pt-16"><div class=pl-scrollbar><div class="mx-auto w-full max-w-screen-xl lg:px-4 xl:px-8"><div class=lg:pt-12><div class="flex flex-col md:flex-row bg-secondary-bg rounded"><div class="md:w-1/4 lg:w-1/5 border-e"><div class="sticky top-16 pt-6"><div id=sidebar-title class="md:hidden mx-4 px-2 pt-4 pb-2 md:border-b text-tertiary-text md:text-primary-text"><span class=font-semibold>Table of Contents</span>
<i class='fas fa-caret-right ms-1'></i></div><div id=sidebar-toc class="hidden md:block overflow-y-auto mx-6 md:mx-0 pe-6 pt-2 md:max-h-doc-sidebar bg-primary-bg md:bg-transparent"><div class="flex flex-wrap ms-4 -me-2 p-2 bg-secondary-bg md:bg-primary-bg rounded"><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/>汇编语言</a></div><ul class=ps-6><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/18/>11.9 ~ 11.11</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/17/>11.7 ~ 11.9</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/16/>11.1 ~ 11.6</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/15/>10.8 ~ 10.12</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/14/>10.1 ~ 10.7</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/13/>9.7 ~ 9.9</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/12/>9.1 ~ 9.6</a></div></li><li class=py-2><div><a class="text-eureka hover:text-eureka" href=https://b.hui.ke/docs/assembly-language/11/>8.5 ~ 8.9</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/10/>8.1</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/9/>7.1 ~ 7.10</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/8/>6.1 ~ 6.3</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/7/>5.1 ~ 5.4</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/6/>4.1 ~ 4.9</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/5/>3.6 ~ 3.10</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/4/>3.1 ~ 3.5</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/3/>2.8 ~ 2.12</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/2/>1.11 ~ 2.6</a></div></li><li class=py-2><div><a class=hover:text-eureka href=https://b.hui.ke/docs/assembly-language/1/>1.1 ~ 1.10</a></div></li></ul></div></div></div><div class="w-full md:w-3/4 lg:w-4/5 pb-8 pt-2 md:pt-8"><div class=flex><div class="w-full lg:w-3/4 px-6"><article class=prose><h1 class=mb-4>8.5 ~ 8.9</h1><div class="text-tertiary-text not-prose mt-2 flex flex-row flex-wrap items-center"><div class="me-6 my-2"><i class="fas fa-calendar me-1"></i>
<span>2020-04-02</span></div><div class="me-6 my-2"><i class="fa-solid fa-pen-to-square me-1"></i>
<span>2020-04-02</span></div><div class="me-6 my-2"><i class="fas fa-clock me-1"></i>
<span>3 min read</span></div><div class="me-6 my-2"><i class="fas fa-folder me-1"></i>
<a href=https://b.hui.ke/categories/it/ class=hover:text-eureka>IT</a></div><div class="me-6 my-2"><i class="fas fa-th-list me-1"></i>
<a href=https://b.hui.ke/series/x86asm-language/ class=hover:text-eureka>x86asm Language</a></div><div class="me-6 my-2"><i class="fa-solid fa-eye me-1"></i>
<span id=busuanzi_value_page_pv><i class="fa fa-spinner fa-spin"></i></span> Hits</div></div><p>  《汇编语言（第3版）》8.5 ~ 8.9、《零基础入门学习汇编语言》P39 ~ 41</p><h3 id=85-指令要处理的数据有多长>8.5 指令要处理的数据有多长</h3><p>  8086 CPU 的指令，可以处理两种尺寸的数据，byte 和 word。所以在机器指令中要指明，指令进行的是字操作还是字节操作。对于这个问题，汇编语言中用以下方法处理</p><ol><li><p>通过寄存器名指明要处理的数据的尺寸</p><pre><code class=language-x86asm># 下面的指令中，寄存器指明了指令进行的是字操作
mov ax,1
mov bx,ds:[0]
mov ds,ax
mov ds:[0],ax
inc ax
add ax,1000

# 下面的指令中，寄存器指明了指令进行的是字节操作
mov al,1
mov al,bl
mov al,ds:[0]
mov ds:[0],al
inc al
add al,100
</code></pre></li><li><p>在没有寄存器名存在的情况下，用操作符 X ptr 指明内存单元的长度，X 在汇编指令中可以为 word 或 byte</p><pre><code class=language-x86asm># 下面的指令中，用 word ptr 指明了指令访问的内存单元是一个字单元
mov word ptr ds:[0],1
inc word ptr [bx]
inc word ptr ds:[0]
add word ptr [bx],2

# 下面的指令中，用 byte ptr 指明了指令访问的内存单元是一个字节单元
mov byte ptr ds:[0],1
inc byte ptr [bx]
inc byte ptr ds:[0]
add byte ptr [bx],2
</code></pre></li><li><p>其他方法（有些指令默认了访问的是字单元还是字节单元）
比如：push [1000H] 就不用指明访问的是字单元还是字节单元，因为 push 指令只进行字操作。</p></li></ol><h3 id=87-div-指令>8.7 div 指令</h3><p>  div 是除法指令（division），使用 div 作除法的时候</p><ol><li>除数：8 位或 16 位，在寄存器或内存单元种</li><li>被除数：（默认）放在 AX 或 DX 和 AX 中</li></ol><table><thead><tr><th style=text-align:center>除数</th><th style=text-align:center>被除数</th></tr></thead><tbody><tr><td style=text-align:center>8 位</td><td style=text-align:center>16 位 (AX)</td></tr><tr><td style=text-align:center>16 位</td><td style=text-align:center>32 位 (DX+AX)</td></tr></tbody></table><p>  结果放在</p><table><thead><tr><th style=text-align:center>除数</th><th style=text-align:center>8 位</th><th style=text-align:center>16 位</th></tr></thead><tbody><tr><td style=text-align:center>商</td><td style=text-align:center>AL</td><td style=text-align:center>AX</td></tr><tr><td style=text-align:center>余数</td><td style=text-align:center>AH</td><td style=text-align:center>DX</td></tr></tbody></table><p>  div 指令格式</p><ol><li>div reg</li><li>div 内存单元</li></ol><p>  div 指令示例与含义</p><ol><li>div byte ptr ds:[0]<ol><li>(al)=(ax)/((ds)×16+0) 的商；</li><li>(ah)=(ax)/((ds)×16+0) 的余数</li></ol></li><li>div word ptr es:[0]<ol><li>(ax)=[(dx)×10000H+(ax)]/((ds)×16+0) 的商；</li><li>(<strong>dx</strong>)=[(dx)×10000H+(ax)]/((ds)×16+0) 的余数</li></ol></li><li>div byte ptr [bx+si+8]<ol><li>(al)=(ax)/((ds)×16+(bx)+(si)+8) 的商；</li><li>(ah)=(ax)/((ds)×16+(bx)+(si)+8) 的余数</li></ol></li><li>div word ptr [bx+si+8]<ol><li>(ax)=[(dx)+10000H+(ax)]/((ds)×16+(bx)+(si)+8) 的商；</li><li>(dx)=[(dx)+10000H+(ax)]/((ds)×16+(bx)+(si)+8) 的余数</li></ol></li></ol><h4 id=编程利用除法指令计算-100001100>编程：利用除法指令计算 100001/100。</h4><p>  我们首先分析一下，被除数 100001 大于 65535，不能用 ax 寄存器存放，所以我们要用 dx 和 ax 两个寄存器联合存放 100001，也就是说要进行 16 位的除法。</p><p>  除数 100 小于 255，可以在一个 8 位寄存器中存放，但是，因为被除数是 32 位的，除数应为 16 位，所以要用一个 16 位寄存器来存放除数 100。</p><p>  因为要分别为 dx 和 ax 赋 100001 的高 16 位值和低 16 位值，所以应先将 100001 表示为十六进制形式：186A1H。</p><p>  编程实现</p><pre><code class=language-x86asm>mov dx,1
mov ax,86A1H     # (dx)×10000H+(ax)=100001
mov bx,100
div bx
</code></pre><p>  程序执行后，(ax)=03E8H（即 1000），(dx)=1（余数为 1）。</p><h3 id=88-伪指令-dd>8.8 伪指令 dd</h3><p>  我们用 db 和 dw 定义字节型数据和字型数据。</p><p>  dd 是用来定义 dword（double word 双字）型数据的。</p><p>  示例</p><pre><code class=language-x86asm>data segment
db 1
dw 1
dd 1
data ends
</code></pre><p>  在 data 段中定义了三个数据</p><ol><li>第一个数据为 01H，在 data:0 处，占 1 个字节；</li><li>第二个数据为 0001H，在 data:1 处，占 1 个字；</li><li>第三个数据为 00000001H，在 data:3 处，占 2 个字；</li></ol><h3 id=89-dup>8.9 dup</h3><p>  dup 是一个操作符，在汇编语言中同 db、dw、dd 等一样，也是由编译器识别处理的符号。</p><p>  它是和 db、dw、dd 等数据定义伪指令配合使用的，用来进行数据的重复。</p><p>  dup 示例</p><pre><code class=language-x86asm>db 3 dup (0)     # 定义了 3 个字节，它们的值都是 0，相当于 db 0,0,0
db 3 dup (0,1,2)     # 定义了 9 个字节，它们是 0、1、2、0、1、2、0、1、2，相当于 db 0,1,2,0,1,2,0,1,2
db 3 dup ('abc','ABC')     # 定义了 18 个字节，它们是 'abcABCabcABCabcABC'，相当于 db'abcABCabcABCabcABC'
</code></pre><p>  可见，dup 的使用格式如下</p><ol><li>db 重复的次数 dup (重复的字节型数据)</li><li>dw 重复的次数 dup (重复的字型数据)</li><li>dd 重复的次数 dup (重复的双字数据)</li></ol></article><div class=my-4><a href=https://b.hui.ke/tags/div/ class="inline-block bg-tertiary-bg text-sm rounded px-3 py-1 my-1 me-2 hover:text-eureka">#div</a>
<a href=https://b.hui.ke/tags/dd/ class="inline-block bg-tertiary-bg text-sm rounded px-3 py-1 my-1 me-2 hover:text-eureka">#dd</a>
<a href=https://b.hui.ke/tags/dup/ class="inline-block bg-tertiary-bg text-sm rounded px-3 py-1 my-1 me-2 hover:text-eureka">#dup</a></div><div class=py-2><div class="my-8 flex flex-col items-center md:flex-row"><a href=https://b.hui.ke/authors/hui.ke/ class="md:me-4 text-primary-text h-24 w-24"><img src=https://b.hui.ke/bagua.webp class="bg-primary-bg w-full rounded-full" alt=Avatar></a><div class="mt-4 w-full md:mt-0 md:w-auto"><a href=https://b.hui.ke/authors/hui.ke/ class="mb-2 block border-b pb-1 text-lg font-bold"><h3>Hui.Ke</h3></a><span class="block pb-2">❤ Cyber Security | Safety is a priority.</span>
<a href=mailto:3199731997@qq.com class=me-2><i class="fas fa-envelope"></i></a>
<a href="https://wpa.qq.com/msgrd?v=3&uin=3199731997" class=me-2><i class="fab fa-qq"></i></a>
<a href=/images/aixinxianquan.webp class=me-2><i class="fab fa-weixin"></i></a></div></div></div><div class="-mx-2 mt-4 flex flex-col border-t px-2 pt-4 md:flex-row md:justify-between"><div><span class="text-primary-text block font-bold">Previous</span>
<a href=https://b.hui.ke/docs/assembly-language/12/ class=block>9.1 ~ 9.6</a></div><div class="mt-4 md:mt-0 md:text-right"><span class="text-primary-text block font-bold">Next</span>
<a href=https://b.hui.ke/docs/assembly-language/10/ class=block>8.1</a></div></div><div id=valine-comments class=mt-4></div><script defer src=https://cdn.jsdelivr.net/npm/valine@1.4.16/dist/Valine.min.js integrity=sha384-e0+DNUCJo75aOAzHQbFWYBCM9/S4f0BhRJXvEgbE3mMS85RM20MSSGStHuNdY2QK crossorigin></script>
<script>document.addEventListener("DOMContentLoaded",function(){new Valine({el:"#valine-comments",appId:"BQnVqWIiq78AdqwyhvBVAa3y-MdYXbMMI",appKey:"RKg5By312YjM8rU6WkkfK9IN",recordIP:"true",serverURLs:"https://l.hui.ke",visitor:"true"})})</script></div><div class="hidden lg:block lg:w-1/4"><div class="bg-secondary-bg
prose sticky top-16 z-10 hidden px-6 py-4 lg:block"><h3>On This Page</h3></div><div class="sticky-toc
border-s
hidden px-6 pb-6 lg:block"><nav id=TableOfContents><ul><li><ul><li><a href=#85-指令要处理的数据有多长>8.5 指令要处理的数据有多长</a></li><li><a href=#87-div-指令>8.7 div 指令</a><ul><li><a href=#编程利用除法指令计算-100001100>编程：利用除法指令计算 100001/100。</a></li></ul></li><li><a href=#88-伪指令-dd>8.8 伪指令 dd</a></li><li><a href=#89-dup>8.9 dup</a></li></ul></li></ul></nav></div><script>window.addEventListener("DOMContentLoaded",()=>{enableStickyToc()})</script></div></div></div></div></div><script>document.addEventListener("DOMContentLoaded",()=>{hljs.highlightAll(),changeSidebarHeight(),switchDocToc()})</script></div></div></main><footer class=pl-scrollbar><div class="mx-auto w-full max-w-screen-xl"><div class="text-center p-6 pin-b"><script async src=/js/click.js></script><div id=poem_ip></div><script type=text/javascript>jinrishici.load(function(e){tags.innerHTML=e.data.matchTags})</script><div><span id=timeDate>载入年天数...</span><span id=times>载入时分秒...</span>
<script async src=/js/duration.js></script></div><a href=https://www.foreverblog.cn/go.html target=_blank><img src=https://img.foreverblog.cn/wormhole_4_tp.gif alt style=display:inline-block;width:auto;height:32px title=穿梭虫洞-随机访问十年之约友链博客></a><p class="text-sm text-tertiary-text"><script async src=//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js></script>本站总访问量 <span id=busuanzi_value_site_pv></span> 次
&#183; 您是本站的第 <span id=busuanzi_value_site_uv></span> 个小伙伴</p><script async src=/js/tab.js></script></div></div></footer></body></html>